<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>加速计算—白熊</title>
		<!-- 新 Bootstrap 核心 CSS 文件 -->
		<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
		 
		<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
		<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
		 
		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<script>
			//js代码要写在这里，JS是让网页和用户有交互
			function calc(){
				sal1 = document.getElementById("salary1").value;
				salnum = parseInt(sal1);
				yifzfz01 = salnum ;
				yifzxs01 = salnum / 60;
				yifzts01 = salnum / 60 /24;
				
				sal2 = document.getElementById("salary2").value;
				salnum2 = parseInt(sal2);
				wufzfz01 = salnum2 * 5;
				wufzxs01 = wufzfz01 / 60;
				wufzts01 = wufzfz01 / 60 /24;
				
				sal3 = document.getElementById("salary3").value;
				salnum3 = parseInt(sal3);
				shfzfz01 = salnum3 * 10;
				shfzxs01 = shfzfz01 / 60;
				shfzts01 = shfzfz01 / 60 /24;
				
				sal4 = document.getElementById("salary4").value;
				salnum4 = parseInt(sal4);
				swfzfz01 = salnum4 * 15;
				swfzxs01 = swfzfz01 / 60;
				swfzts01 = swfzfz01 / 60 /24;
				
				sal5 = document.getElementById("salary5").value;
				salnum5 = parseInt(sal5);
				ssfzfz01 = salnum5 * 30;
				ssfzxs01 = ssfzfz01 / 60;
				ssfzts01 = ssfzfz01 / 60 /24;
				
				sal6 = document.getElementById("salary6").value;
				salnum6 = parseInt(sal6);
				lsfzfz01 = salnum6 * 60;
				lsfzxs01 = lsfzfz01 / 60;
				lsfzts01 = lsfzfz01 / 60 /24;
				
				sal7 = document.getElementById("salary7").value;
				salnum7 = parseInt(sal7);
				sxfz01 = salnum7 * 3 * 60;
				sxxs01 = sxfz01 / 60;
				sxts01 = sxfz01 / 60 /24;
				
				sal8 = document.getElementById("salary8").value;
				salnum8 = parseInt(sal8);
				bxfz01 = salnum8 * 8 * 60;
				bxxs01 = bxfz01 / 60;
				bxts01 = bxfz01 / 60 /24;
				
				sal9 = document.getElementById("salary9").value;
				salnum9 = parseInt(sal9);
				swxfz01 = salnum9 * 15 * 60;
				swxxs01 = swxfz01 / 60;
				swxts01 = swxfz01 / 60 /24;
				
				totalfz01=yifzfz01 + wufzfz01 + shfzfz01 + swfzfz01 + ssfzfz01 + lsfzfz01 + sxfz01 + bxfz01 + swxfz01;
				totalxs01=yifzxs01 + wufzxs01 + shfzxs01 + swfzxs01 + ssfzxs01 + lsfzxs01 + sxxs01 + bxxs01 + swxxs01;
				totalts01=yifzts01 + wufzts01 + shfzts01 + swfzts01 + ssfzts01 + lsfzts01 + sxts01 + bxts01 + swxts01;
				
				document.getElementById("yifzfz").innerText=yifzfz01;
				document.getElementById("yifzxs").innerText=yifzxs01;
				document.getElementById("yifzts").innerText=yifzts01;
				
				document.getElementById("wufzfz").innerText=wufzfz01;
				document.getElementById("wufzxs").innerText=wufzxs01;
				document.getElementById("wufzts").innerText=wufzts01;
				
				document.getElementById("shfzfz").innerText=shfzfz01;
				document.getElementById("shfzxs").innerText=shfzxs01;
				document.getElementById("shfzts").innerText=shfzts01;
				
				document.getElementById("swfzfz").innerText=swfzfz01;
				document.getElementById("swfzxs").innerText=swfzxs01;
				document.getElementById("swfzts").innerText=swfzts01;
				
				document.getElementById("ssfzfz").innerText=ssfzfz01;
				document.getElementById("ssfzxs").innerText=ssfzxs01;
				document.getElementById("ssfzts").innerText=ssfzts01;
				
				document.getElementById("lsfzfz").innerText=lsfzfz01;
				document.getElementById("lsfzxs").innerText=lsfzxs01;
				document.getElementById("lsfzts").innerText=lsfzts01;
				
				document.getElementById("sxfz").innerText=sxfz01;
				document.getElementById("sxxs").innerText=sxxs01;
				document.getElementById("sxts").innerText=sxts01;
				
				document.getElementById("bxfz").innerText=bxfz01;
				document.getElementById("bxxs").innerText=bxxs01;
				document.getElementById("bxts").innerText=bxts01;
				
				document.getElementById("swxfz").innerText=swxfz01;
				document.getElementById("swxxs").innerText=swxxs01;
				document.getElementById("swxts").innerText=swxts01;
				
				document.getElementById("totalfz").innerText=totalfz01;
				document.getElementById("totalxs").innerText=totalxs01;
				document.getElementById("totalts").innerText=totalts01;
			}
		</script>
	</head>
	<body>
		<div class="container" text-center>
			<h1>加速计算器-web版—白熊</h1>
			<table class="table table-bordered text-center">
				<tr>
					<td colspan="4">加速计算器</td>	
					<td>
						<button onclick="calc()" class="btn btn-danger btn-block">计算</button>
					</td>
				</tr>
				<tr class="bg-primary">
					<td colspan="2">道具种类</td>
					<td>分钟</td>
					<td>小时</td>
					<td>天数</td>
				</tr>
				<tr>
					<td>1分钟</td>
					<td>
						<input id="salary1" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="yifzfz"></td>
					<td id="yifzxs"></td>
					<td id="yifzts"></td>
				</tr>
				
				<tr>
					<td>5分钟</td>
					<td>
						<input id="salary2" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="wufzfz"></td>
					<td id="wufzxs"></td>
					<td id="wufzts"></td>
				</tr>
				
				<tr>
					<td>10分钟</td>
					<td>
						<input id="salary3" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="shfzfz"></td>
					<td id="shfzxs"></td>
					<td id="shfzts"></td>
				</tr>
				
				<tr>
					<td>15分钟</td>
					<td>
						<input id="salary4" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="swfzfz"></td>
					<td id="swfzxs"></td>
					<td id="swfzts"></td>
				</tr>
				
				<tr>
					<td>30分钟</td>
					<td>
						<input id="salary5" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="ssfzfz"></td>
					<td id="ssfzxs"></td>
					<td id="ssfzts"></td>
				</tr>
				
				<tr>
					<td>60分钟</td>
					<td>
						<input id="salary6" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="lsfzfz"></td>
					<td id="lsfzxs"></td>
					<td id="lsfzts"></td>
				</tr>
				
				<tr>
					<td>3小时</td>
					<td>
						<input id="salary7" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="sxfz"></td>
					<td id="sxxs"></td>
					<td id="sxts"></td>
				</tr>
				
				<tr>
					<td>8小时</td>
					<td>
						<input id="salary8" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="bxfz"></td>
					<td id="bxxs"></td>
					<td id="bxts"></td>
				</tr>
				
				<tr>
					<td>15小时</td>
					<td>
						<input id="salary9" class="form-control" type="text"placeholder="请输入道具数量" />
					</td>
					<td id="swxfz"></td>
					<td id="swxxs"></td>
					<td id="swxts"></td>
				</tr>
				
				<tr>
					<td colspan="2">总额</td>
					<td id="totalfz"></td>
					<td id="totalxs"></td>
					<td id="totalts"></td>
				</tr>
				
			</table>
		</div>
	</body>
</html>
